2 links tagged with all of: claude code + ai + prompt engineering
Click any tag below to further narrow down your results
Links
This article breaks down the key sections and best practices for your CLAUDE.md file, the project context guide that Claude Code reads before writing or editing code. It covers what to include—from project overview and tech stack to safety rules and commands—so the AI stays aligned with your repo’s structure and standards.
- CLAUDE.md is read by Claude Code before every code write/edit, so it functions as persistent project context rather than a one-time config file
- Specificity beats generality: naming exact versions/libraries ("Next.js App Router + TypeScript + Tailwind + shadcn/ui + Supabase") works far better than vague stack descriptions
- Concrete coding rules like "use named exports except in route files" or "avoid any; prefer explicit interfaces" produce better-fitting code than generic guidance like "clean code"
- The file should act as a living reference to guide suggestions, not a rigid enforcement mechanism that blocks workflow
This article examines how Claude Code constructs its system prompts by analyzing recently leaked source code. It highlights the dynamic nature of these prompts, which are built from various components based on conditional statements. The author also outlines additional elements that contribute to context, like tool definitions and conversation history.
- Claude Code's system prompt isn't static text—it's dynamically assembled at runtime from conditional components, revealed by a recent source code leak.
- The prompt mixes always-included elements (like core instructions) with conditional ones (like tool-specific guidance) that only appear based on context.
- Beyond the system prompt itself, the full context sent to the model includes tool definitions, conversation history, attachments, and skills—all engineered together to shape responses.